<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
use WebSocket\Client;
Route::get('/', function () {
    $client = new Client("ws://47.106.117.232:9502");
    $data = ['key'=>request()->key,'id'=>request()->id];
    echo json_encode($data);
    $client->send(json_encode($data));
    $client->close();
});

Route::get('/test', function () {
    echo 1;
});


